import { lazy, Suspense } from 'react';
import { Layout } from 'antd';
// import Homehead from '../../components/home/homeHead';
// import HomeContent from '../../components/home/homeContent';
// import HomeMenu from '../../components/home/homeMenu';
// 使用lazy加载方式引入组件
const Homehead = lazy(() => import('../../components/home/homeHead'))
const HomeContent = lazy(() => import('../../components/home/homeContent'))
const HomeMenu = lazy(() => import('../../components/home/homeMenu'))
const Home = () => {
  return (
    <Layout style={{ minHeight: '100vh', }}>
      {/* 使用Suspense组件用于包裹异步组件 */}
      <Suspense fallback={<div>加载中。。。</div>}>
        <HomeMenu></HomeMenu>
      </Suspense>
      <Layout className="site-layout">
        {/* 头部 */}
        <Suspense>
          <Homehead></Homehead>
        </Suspense>
        {/* 内容区域 */}
        <Suspense>
          <HomeContent></HomeContent>
        </Suspense>
      </Layout>
    </Layout>
  );
};
export default Home;